#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>

void Reverse(char * p, int sz)
{
	for (int i = sz - 1; i >= 0; i--)
	{
		printf("%c", *(p + i));
	}
}

int main()
{
	char s[1001] = { 0 };
	while (gets(s) != NULL)
	{
		Reverse(s, strlen(s));
	}
	return 0;
}